myApp_.onPageInit('order_detail',function(page){
	ORDER_DETAIL.request(ORDER_DETAIL.id);
});

ORDER_DETAIL = {};
ORDER_DETAIL.id = '';

ORDER_DETAIL.data = {};

ORDER_DETAIL.__INIT__ = function(id){
	ORDER_DETAIL.id = id;
	mainView.router.load({
	    url: "src/my_center/order/order_detail.html"
	});
}

ORDER_DETAIL.request = function(id){
	request_(
		url_('api/V4/order_item')
		,{order_id: id}
		,function(d){
			if (d.code == 0) {
				ORDER_DETAIL.data = d.data;
				ORDER_DETAIL.fill();
			} else {
		        my_tips_(d.msg);
		    }
		}
	);
}

ORDER_DETAIL.fill = function(){
	$.tpl({
		url: 'src/my_center/order/order_detail_tpl.html'
		,context: ORDER_DETAIL.data
		,elem: '.order_detail_container'
	});
}

	
